View source code
Display the source code in std/datetime.d from which this page was generated on
github.
Improve this page
Quickly fork, edit online, and submit a pull request for this page.
Requires a signed-in GitHub account. This works well for small changes.
If you'd like to make larger changes you may want to consider using
local clone.
Page wiki
View or edit the community-maintained wiki page associated with this page.
Class std.datetime.Clock
Effectively a namespace to make it clear that the methods it contains are getting the time from the system clock. It cannot be instantiated.
Inherits from
-
(base class)Object
Properties
Name | Type | Description |
---|---|---|
currAppTick
[get]
|
TickDuration |
The current number of system ticks since the application started. The number of ticks per second varies from system to system. This uses a monotonic clock. |
currStdTime
[get]
|
long |
Returns the number of hnsecs since midnight, January 1st, 1 A.D. for the current time. |
currSystemTick
[get]
|
TickDuration |
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.
|
Methods
Name | Description |
---|---|
currTime
|
Returns the current time in the given time zone. |
factory
|
Create instance of class specified by the fully qualified name
classname .
The class must either have no constructors or have
a default constructor.
|
opCmp
|
Compare with another Object obj.
|
opEquals
|
Returns !=0 if this object does have the same contents as obj.
|
toHash
|
Compute hash function for Object .
|
toString
|
Convert Object to a human readable string.
|
Authors
Jonathan M Davis and Kato Shoichi