File: sysutil.go

package info (click to toggle)
golang-github-chromedp-sysutil 1.0.0-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 112 kB
  • sloc: makefile: 5
file content (15 lines) | stat: -rw-r--r-- 268 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
package sysutil

import "time"

var btime time.Time

// BootTime returns the time the system was started.
func BootTime() time.Time {
	return btime
}

// Uptime returns the duration the system has been up.
func Uptime() time.Duration {
	return time.Now().Sub(btime)
}