Go Language Runtime
Go Language Runtime
Commonly used time slots
The Duration type represents the time elapsed between two points in time, measured in nanoseconds. The longest time period that can be represented is approximately 290 years.
Sleep blocks the current go process for at least the time period represented by d. d
Returns true if the point in time represented by t is before u; otherwise returns false.
Returns true if the point in time represented by t is after u; otherwise returns false.
Code implementation.
runtime
Since returns the time elapsed from t to the present, equivalent to time. Now(). Sub(t).
The function time. Since() , which calculates the time golang takes to run, is a very useful performance measure, especially in concurrent benchmarking.
Code implementation.
NEXT STORY.
Go Language Timer ------ Stay tuned!
Chapter 11 Concurrent Programming
Chapter 12 Reflection
Chapter XIII. Data formats
Chapter 14 Terminal reading
Chapter XV. Document operations
Chapter XVI. Handling of incidents