Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for 4h30m (0.27 sec)

  1. src/time/example_test.go

    	// 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() {
    	u, _ := time.ParseDuration("1s")
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Feb 13 01:05:00 UTC 2024
    - 22.4K bytes
    - Viewed (0)
  2. src/time/time_test.go

    	{"12µs", 12 * Microsecond}, // U+00B5
    	{"12μs", 12 * Microsecond}, // U+03BC
    	{"13ms", 13 * Millisecond},
    	{"14s", 14 * Second},
    	{"15m", 15 * Minute},
    	{"16h", 16 * Hour},
    	// composite durations
    	{"3h30m", 3*Hour + 30*Minute},
    	{"10.5s4m", 4*Minute + 10*Second + 500*Millisecond},
    	{"-2m3.4s", -(2*Minute + 3*Second + 400*Millisecond)},
    	{"1h2m3s4ms5us6ns", 1*Hour + 2*Minute + 3*Second + 4*Millisecond + 5*Microsecond + 6*Nanosecond},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 03:13:47 UTC 2024
    - 56.5K bytes
    - Viewed (0)
Back to top