Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for ExampleDuration_Hours (0.25 sec)

  1. src/time/example_test.go

    	// Output:
    	// 10h0m0s
    	// 1h10m10s
    	// There are 4210 seconds in 1h10m10s.
    	// There are 1000 nanoseconds in 1µs.
    	// There are 1.00e-06 seconds in 1µs.
    }
    
    func ExampleDuration_Hours() {
    	h, _ := time.ParseDuration("4h30m")
    	fmt.Printf("I've got %.1f hours of work left.", h.Hours())
    	// Output: I've got 4.5 hours of work left.
    }
    
    func ExampleDuration_Microseconds() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 13 01:05:00 UTC 2024
    - 22.4K bytes
    - Viewed (0)
Back to top