Duration

Documentation of Synapse Z Duration class

Duration.TimeSinceEpoch

table Duration.TimeSinceEpoch()

returns a new duration object with its fields being current time since epoch

Duration.FromNanoseconds

table Duration.FromNanoseconds(nanoseconds: number)

returns a new duration object with its fields being the nanoseconds time

Duration.FromMicroseconds

table Duration.FromMicroseconds(microseconds: number)

returns a new duration object with its fields being the microseconds time

Duration.FromMilliseconds

table Duration.FromMilliseconds(milliseconds: number)

returns a new duration object with its fields being the milliseconds time

Duration.FromSeconds

table Duration.FromSeconds(seconds: number)

returns a new duration object with its fields being the seconds time

Duration.FromMinutes

table Duration.FromMinutes(minutes: number)

returns a new duration object with its fields being the minutes time

Duration.FromHours

table Duration.FromHours(hours: number)

returns a new duration object with its fields being the hours time

Duration.FromDays

table Duration.FromDays(days: number)

returns a new duration object with its fields being the days time

Duration.FromWeeks

table Duration.FromWeeks(weeks: number)

returns a new duration object with its fields being the weeks time

Duration.FromMonths

table Duration.FromMonths(months: number)

returns a new duration object with its fields being the months time

Duration.FromYears

table Duration.FromYears(years: number)

returns a new duration object with its fields being the years time

FieldTypeDescription
Nanosecondsnumberthe time in nanoseconds
Microsecondsnumberthe time in microseconds
Millisecondsnumberthe time in milliseconds
Secondsnumberthe time in seconds
Minutesnumberthe time in minutes
Hoursnumberthe time in hours
Daysnumberthe time in days
Weeksnumberthe time in weeks
Monthsnumberthe time in months
Yearsnumberthe time in years