Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个纳秒整数需要在 ruby 中格式化为 Time 对象。如何从 ruby 中的纳秒获取 Time 对象?
我试过了
Time.strptime '2318482693000', '%N'
但返回的时间是当前时间而不是给定的确切时间(以纳秒为单位)
你最好考虑使用Time#at。但是您必须稍微调整一下 nano elapse。