我正在尝试确定UTC当前日期的开始和结束时间。
目前这是我的解决方案。`
var starttime = date.getTime() -(date.getHours() * 3600000 ); //subtracting a hours to go back to start time of the day.
var endtime = low + 86400000; //adding 24 hours to the start time
`
Run Code Online (Sandbox Code Playgroud)
任何帮助表示赞赏!谢谢
这是代码片段:
OS.config flatMap {_.Allocation } flatMap {_.memory}
Run Code Online (Sandbox Code Playgroud)
从memory参数获得的值为Option[Long]。
如何比较并检查它是否大于零?
我尝试使用过滤器,但获得的答案是Option[Boolean]。我需要检查许多对象,如果该值大于零,则增加计数器。