mirror of
https://codeberg.org/scip/golsky.git
synced 2025-12-17 04:30:57 +01:00
repackage code to cmd
This commit is contained in:
11
cmd/system.go
Normal file
11
cmd/system.go
Normal file
@@ -0,0 +1,11 @@
|
||||
package cmd
|
||||
|
||||
import "runtime"
|
||||
|
||||
// returns current memory usage in MB
|
||||
func GetMem() float64 {
|
||||
var m runtime.MemStats
|
||||
runtime.ReadMemStats(&m)
|
||||
|
||||
return float64(m.Alloc) / 1024 / 1024
|
||||
}
|
||||
Reference in New Issue
Block a user