Search Options

Results per page
Sort
Preferred Languages
Advance

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

  1. src/go/doc/testdata/testing.go

    	}
    }
    
    var timer *time.Timer
    
    // startAlarm starts an alarm if requested.
    func startAlarm() {
    	if *timeout > 0 {
    		timer = time.AfterFunc(*timeout, alarm)
    	}
    }
    
    // stopAlarm turns off the alarm.
    func stopAlarm() {
    	if *timeout > 0 {
    		timer.Stop()
    	}
    }
    
    // alarm is called if the timeout expires.
    func alarm() {
    	panic("test timed out")
    }
    
    func parseCpuList() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sun Oct 02 02:28:27 UTC 2022
    - 11.8K bytes
    - Viewed (0)
  2. src/testing/testing.go

    		return true
    	})
    	slices.Sort(list)
    	return list
    }
    
    // stopAlarm turns off the alarm.
    func (m *M) stopAlarm() {
    	if *timeout > 0 {
    		m.timer.Stop()
    	}
    }
    
    func parseCpuList() {
    	for _, val := range strings.Split(*cpuListStr, ",") {
    		val = strings.TrimSpace(val)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 76.1K bytes
    - Viewed (0)
Back to top