3

System uptime is available in chrome without enabling the developer mode via the crosh window and the command top. I'd like to be able to access this programmatically within my chrome app. I'm not seeing it jump out at me in the chrome apis here.

Uptime usually includes both the load average and the time since the last boot-up. I'm mostly interested in the time since the last boot-up.

How can I get system uptime programmatically on the chrome-os platform - without enabling developer mode?

davidpricedev
  • 2,107
  • 2
  • 20
  • 34

1 Answers1

0

I do not have a chrome development environment set up at the moment, or I'd try. But chrome.system.cpu.getInfo() looks like it will give you what you want. Note that the processors array gives cumulative time (total) that may be equivalent to time since last boot.

See https://developer.chrome.com/apps/system_cpu.

MaRib
  • 31
  • 4