Open faayizm opened 1 month ago
Below is the program i tried.
package main
import ( "fmt" "time" )
func main() { fmt.Println("Starting Go sleep test in infinite loop...") for { fmt.Println("Sleeping for 2 seconds...") time.Sleep(2 * time.Second) fmt.Println("Awake!") } }
Below is the program i tried.
package main
import ( "fmt" "time" )
func main() { fmt.Println("Starting Go sleep test in infinite loop...") for { fmt.Println("Sleeping for 2 seconds...") time.Sleep(2 * time.Second) fmt.Println("Awake!") } }