github.com/neilgarb/delve@v1.9.2-nobreaks/_fixtures/testprog.go (about)

     1  package main
     2  
     3  import (
     4  	"fmt"
     5  	"runtime"
     6  	"time"
     7  )
     8  
     9  func helloworld() {
    10  	fmt.Println("Hello, World!")
    11  }
    12  
    13  func sleepytime() {
    14  	time.Sleep(time.Millisecond)
    15  }
    16  
    17  func main() {
    18  	for i := 0; i < 500; i++ {
    19  		sleepytime()
    20  		helloworld()
    21  	}
    22  }
    23  
    24  func init() {
    25  	runtime.LockOSThread()
    26  }