Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ForceUSPacificForTesting (0.2 sec)

  1. src/time/internal_test.go

    // Use of this source code is governed by a BSD-style
    // license that can be found in the LICENSE file.
    
    package time
    
    func init() {
    	// Force US/Pacific for time zone tests.
    	ForceUSPacificForTesting()
    }
    
    func initTestingZone() {
    	// For hermeticity, use only tzinfo source from the test's GOROOT,
    	// not the system sources and not whatever GOROOT may happen to be
    	// set in the process's environment (if any).
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Jun 03 14:56:37 UTC 2024
    - 2.2K bytes
    - Viewed (0)
  2. src/time/time_test.go

    	c := make(chan string, 1)
    	go func() {
    		c <- Now().String()
    	}()
    	_ = Now().String()
    	<-c
    	Sleep(100 * Millisecond)
    
    	// Back to Los Angeles for subsequent tests:
    	ForceUSPacificForTesting()
    }
    
    var (
    	t Time
    	u int64
    )
    
    var mallocTest = []struct {
    	count int
    	desc  string
    	fn    func()
    }{
    	{0, `time.Now()`, func() { t = Now() }},
    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