# Import needed modules from osc4py3
from osc4py3.as_allthreads import *
from osc4py3 import oscmethod as osm
from osc4py3 import oscbuildparse

def handlerfunction(*args):
    # Will receive message data unpacked in s, x, y
    print(args[-1].sec)
    print(oscbuildparse.timetag2unixtime(args[-1]))
# Start the system.
osc_startup()

# Make server channels to receive packets.
osc_udp_server("0.0.0.0", 8000, "anotherserver")

# Associate Python functions with message address patterns, using default
# argument scheme OSCARG_DATAUNPACK.
osc_method("/test/me", handlerfunction, argscheme=osm.OSCARG_TYPETAGS + osm.OSCARG_DATAUNPACK)

