TickDuration

Warning: TickDuration is deprecated. Please use MonoTime for the cases where a monotonic timestamp is needed and Duration when a duration is needed, rather than using TickDuration.

Represents a duration of time in system clock ticks.

The system clock ticks are the ticks of the system clock at the highest precision that the system provides.

Constructors

this
deprecated this(long ticks)

Members

Functions

opBinary
deprecated TickDuration opBinary(TickDuration rhs)

Adds or subtracts two TickDurations.

opBinary
deprecated TickDuration opBinary(T value)

The legal types of arithmetic for TickDuration using this operator overload are

opBinary
deprecated TickDuration opBinary(T value)

The legal types of arithmetic for TickDuration using this operator overload are

opCast
deprecated Duration opCast()

Returns a Duration with the same number of hnsecs as this TickDuration. Note that the conventional way to convert between TickDuration and Duration is using std.conv.to, e.g.: tickDuration.to!Duration()

opCmp
deprecated int opCmp(TickDuration rhs)

operator overloading "<, >, <=, >="

opOpAssign
deprecated TickDuration opOpAssign(TickDuration rhs)

Adds or subtracts two TickDurations as well as assigning the result to this TickDuration.

opOpAssign
deprecated void opOpAssign(T value)

The legal types of arithmetic for TickDuration using this operator overload are

opOpAssign
deprecated void opOpAssign(T value)

The legal types of arithmetic for TickDuration using this operator overload are

opUnary
deprecated TickDuration opUnary()

Returns the negation of this TickDuration.

Properties

currSystemTick
deprecated TickDuration currSystemTick [@property getter]

The current system tick. The number of ticks per second varies from system to system. currSystemTick uses a monotonic clock, so it's intended for precision timing by comparing relative time values, not for getting the current system time.

hnsecs
deprecated long hnsecs [@property getter]

Returns the total number of hecto-nanoseconds in this TickDuration.

max
deprecated TickDuration max [@property getter]

Largest TickDuration possible.

min
deprecated TickDuration min [@property getter]

Most negative TickDuration possible.

msecs
deprecated long msecs [@property getter]

Returns the total number of milliseconds in this TickDuration.

nsecs
deprecated long nsecs [@property getter]

Returns the total number of nanoseconds in this TickDuration.

seconds
deprecated long seconds [@property getter]

Returns the total number of seconds in this TickDuration.

usecs
deprecated long usecs [@property getter]

Returns the total number of microseconds in this TickDuration.

zero
deprecated TickDuration zero [@property getter]

It's the same as TickDuration(0), but it's provided to be consistent with Duration, which provides a zero property.

Static functions

from
deprecated TickDuration from(long length)

This allows you to construct a TickDuration from the given time units with the given length.

Static variables

appOrigin
deprecated TickDuration appOrigin;

The tick of the system clock (as a TickDuration) when the application started.

ticksPerSec
deprecated long ticksPerSec;

The number of ticks that the system clock has in one second.

Variables

length
deprecated long length;

The number of system ticks in this TickDuration.

Meta