Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for expensiveCall (0.14 sec)

  1. src/time/example_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package time_test
    
    import (
    	"fmt"
    	"time"
    )
    
    func expensiveCall() {}
    
    func ExampleDuration() {
    	t0 := time.Now()
    	expensiveCall()
    	t1 := time.Now()
    	fmt.Printf("The call took %v to run.\n", t1.Sub(t0))
    }
    
    func ExampleDuration_Round() {
    	d, err := time.ParseDuration("1h15m30.918273645s")
    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