Skip to content

Instantly share code, notes, and snippets.

@gsscoder
Last active December 20, 2019 06:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gsscoder/a4e18144fddefdfc9ecc25bb479f7d17 to your computer and use it in GitHub Desktop.
Save gsscoder/a4e18144fddefdfc9ecc25bb479f7d17 to your computer and use it in GitHub Desktop.
Infinity loop written in Go to check CPU usage
package main
import (
"fmt"
"time"
)
func main() {
for {
time.Sleep(time.Second) // comment this to overload the CPU
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment