Miscellaneous¶
Time utilities (pymanip.mytime
)¶
This modules contains very simple functions for handling dates and times.
In particular, the datestr2epoch()
is useful to read fluidlab’s session timestamps
which are roughly in RFC 3339 format.
-
pymanip.mytime.
sleep
(duration)[source]¶ Prints a timer for specified duration. This is mostly similar to
pymanip.asyncsession.AsyncSession.sleep()
, except that it is meant to be used outside a session.- Parameters
duration (float) – the duration for which to sleep
-
pymanip.mytime.
datestr2epoch
(string)[source]¶ Convert datestr into epoch. Correct string is: ‘2016-02-25T17:36+0100’ or ‘2016-02-25T17:36+01:00’.
UTC+1 or UTC+0100 is also accepted by this function Accepts a single string or a list of string