amalthea.time

Undocumented in source.

Public Imports

amalthea.libcore
public import amalthea.libcore;
Undocumented in source.

Members

Functions

convTimestampToSysTime
SysTime convTimestampToSysTime(timestamp_t t)

Transforms UNIX timestamp structure to std.datetime.systime.SysTime. SysTime stores hectonanoseconds, so some of the timestamp info is lost.

getCurrentTimestamp
timestamp_t getCurrentTimestamp()

Current time as timestamp_t.

getTZOffsetAsString
string getTZOffsetAsString()

Returns string with timezone offset (hours and minutes) like +0300 or -0700.

getTimeExtString
string getTimeExtString(timestamp_t t)

Gets a time string by timestamp content with nanoseconds.

getTimeExtString
string getTimeExtString()

Gets a string containing the current time with nanoseconds.

getTimeString
string getTimeString(SysTime sysTime)

Gets a time string from the std.datetime.systime.SysTime object.

getTimeString
string getTimeString()

Gets a time string with the current time.

getTimeString
string getTimeString(long secondsByUnixTime)

Gets a time string by UNIX time (number of seconds).

getTimeString
string getTimeString(timestamp_t t)

Gets a time string by timestamp (only seconds from timestamp is used).

msleep
void msleep(ulong milliseconds)

The function makes a delay, expressed in milliseconds.

sleep
void sleep(double seconds)

The function makes a delay, expressed in seconds.

unixTime
long unixTime(string timeString)

The function returns number of seconds since 1970-01-01.

usleep
void usleep(ulong microseconds)

The function makes a delay, expressed in microseconds.

Structs

timestamp_t
struct timestamp_t

UNIX timestamp structure. Corresponds to C structure types 'statx_timestamp' and 'timespec'.

Meta