km3pipe.time

Manipulating time and so…

Module Contents

Classes

Timer

A very simple, accurate and easy to use timer context

Cuckoo

A timed callback caller, which only executes once in a given interval.

Functions

total_seconds(td)

Convert the timedelta to seconds.

tai_timestamp()

Return current TAI timestamp.

np_to_datetime(intime)

Convert numpy/pandas datetime64 to list[datetime].

km3pipe.time.total_seconds(td)[source]

Convert the timedelta to seconds.

class km3pipe.time.Timer(message='It', precision=3, callback=print)[source]

A very simple, accurate and easy to use timer context

property seconds[source]
property cpu_seconds[source]
start()[source]
stop()[source]
log()[source]
class km3pipe.time.Cuckoo(interval=0, callback=print)[source]

A timed callback caller, which only executes once in a given interval.

msg(*args, **kwargs)[source]

Only execute callback when interval is reached.

reset()[source]

Reset the timestamp

km3pipe.time.tai_timestamp()[source]

Return current TAI timestamp.

km3pipe.time.np_to_datetime(intime)[source]

Convert numpy/pandas datetime64 to list[datetime].