Sha256: 22b5dd3e136770ccfcf014aebb4730e7e568543c59c3aa46cf2606be06469428
Contents?: true
Size: 1.32 KB
Versions: 23
Compression:
Stored size: 1.32 KB
Contents
using System; namespace rho.common { public class TimeInterval { public TimeInterval() { m_nativeTime = 0; } public String toString() { long nMin = m_nativeTime / (60 * 1000); long nSec = (m_nativeTime - nMin * (60 * 1000)) / 1000; long mSec = m_nativeTime - nSec * 1000 - nMin * (60 * 1000); String strTime = nMin + ":" + nSec + ":" + mSec; return strTime; } public long toULong() { return m_nativeTime; } public TimeInterval minus(TimeInterval time) { TimeInterval res = new TimeInterval(); res.m_nativeTime = m_nativeTime - time.m_nativeTime; return res; } public void addMillis(int nMs) { m_nativeTime += nMs; } public TimeInterval plusAssign(TimeInterval time) { m_nativeTime += time.m_nativeTime; return this; } public static TimeInterval getCurrentTime() { TimeInterval res = new TimeInterval(); res.m_nativeTime = DateTime.Now.ToFileTime(); return res; } public boolean isEmpty() { return m_nativeTime == 0; } private long m_nativeTime; } }
Version data entries
23 entries across 23 versions & 1 rubygems