Skip to content

Instantly share code, notes, and snippets.

@mavenraven
Created February 24, 2016 21:01
Show Gist options
  • Save mavenraven/f5291fe3a4a885f68bab to your computer and use it in GitHub Desktop.
Save mavenraven/f5291fe3a4a885f68bab to your computer and use it in GitHub Desktop.
package main
import "fmt"
//import "runtime/debug"
import "os"
import "os/exec"
import "time"
import "strconv"
func main() {
x := 1
fmt.Println("hello world")
fmt.Println(x)
fmt.Println("im going in a frame")
hi()
}
func hi() {
x := 0
for {
cmd := exec.Command("gcore", strconv.Itoa(os.Getpid()))
output, err := cmd.CombinedOutput()
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(output))
time.Sleep(time.Second * 1)
x = x + 1
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment