Module time



time:()
Return the current time as Time object.

time:(year, month = 1, day = 1, hour = 0, minute = 0, Float second = 0)
Constructs a Time object from specified arguments.

Time Methods

time:delta(days, hours = 0, minutes = 0, seconds = 0, milliseconds = 0, microseconds = 0, weeks = 0)
Return Delta object.
Delta Members
The following operators are supported:
Time - Time -> Delta
Time + Delta -> Time
Time - Delta -> Time

time:today()
Return the current time as
time:(current_year, current_month, current_day)
.

time:from_unix_time(Float seconds_since_the_epoch)
Return a Time object corresponding to the POSIX timestamp (i.e. seconds since the epoch).

time:strptime(string, format) -> Time
Parse a string representing a time according to a format.
The
format
parameter uses the same directives as those used by
Time.strftime()
.

time:perf_counter()
Return the value of a performance counter, i.e. a clock with the highest available resolution to measure a short duration.
It can be used as follows:
V start = time:perf_counter()
...
print(‘Elapsed: ’(time:perf_counter() - start)‘ seconds’)