Standard library / time
time.Since()
Measure elapsed duration since t; uses monotonic readings when both are available. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
func Since(t Time) DurationParameters & Attributes
| Name | Type | Description |
|---|---|---|
| t | Time | Reference instant. |
Return Value
Duration
Measure elapsed duration since t; uses monotonic readings when both are available.
Working Example
Example Snippetgo
package main
import ( "fmt" "time")
func main() { start := time.Now(); fmt.Println(time.Since(start) >= 0) }