Module timeTime methodsTime() Return the current time. Time(year, month = 1, day = 1, hour = 0, minute = 0, Float second = 0) Constructs a Time object from specified arguments. unix_time() Return seconds since the epoch as a floating point number. strftime(format) Return a string representing the time, controlled by an explicit format string. For a complete list of formatting directives, see https://en.cppreference.com/w/c/chrono/strftime. format(fmt) Similar to strftime(), but format is much simpler:
TimeDelta methods and membersTimeDelta(', days = 0, hours = 0, minutes = 0, seconds = 0, milliseconds = 0, microseconds = 0, weeks = 0) Constructor. seconds Number of seconds. days() Number of days. The following operators are supported: Time - Time -> TimeDelta Time + TimeDelta -> Time Time - TimeDelta -> Time time functionstime: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 formatparameter 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’) |