Query for system (not JVM) uptime in Java [duplicate]

隐身守侯 提交于 2019-12-01 06:35:36

Yes and no.

  • There are system specific ways of querying uptime (e.g. uptime on *nix)
  • There are ways to detect the operating system.
  • There is a small finite number of likely operating systems.
  • And you're in a general purpose programming environment, so...

so it shoudln't be a big deal that they implement it, since they are writting specific JRE for each platform, which is aware of uptime() version for each OS, and they could easily wrap it into some java call, like getSystemUptime()

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!