TimeUtils
Timestamp
TimeSpan TimeUtils.GetTimestamp() // return timestamp 1970
TimeSpan TimeUtils.GetMilleniumTimestamp() // return timestamp 2000
TimeSpan TimeUtils.GetRuntimeTimestamp() // return timestamp. The reference date may be different between versions. Do not use it to save data.
TimeSpan TimeUtils.GetRuntimeTimestamp() // return timestamp. The reference date may be different between versions. Do not use it to save data.
TimeSpan TimeUtils.GetTimestampSinceStartup() // Time.unscaledTime usable in other threads
RoutineList
Invoke Action for each object distributed on a duration
var myNumbers = new HashSet<int>();
data.Add(1);
data.Add(2);
data.Add(3);
StartCoroutine(TimeUtils.RoutineList<int>(new System.WeakReference(myNumbers), 1.2f, num => {
Debug.Log(num);
}));
1
// wait 0.4 s
2
// wait 0.4 s
3
// wait 0.4 s
1
// wait 0.4 s
2
// wait 0.4 s
3
// wait 0.4 s
...