Class YYtime

  extended by YYtime

public final class YYtime
extends java.lang.Object

System.currentTimeMillis() may depend on the Network Time Protocol (NTP). An adversary can change the packets, potentially trying to set the time backwards, or keeping time fixed. This could all be aimed at disrupting feralcore or applications running on top of feralcore, such as yyrerandtrans. For this reason this class was created. It wraps System.currentTimeMillis() in a call that makes sure that time moves monotonically forward. If time fails to move forward then it is an error.

We don't ever want the adversary to be able to rewind the time. So, this class saves its notion of the time in a file on disk.

Method Summary
static long yycurrenttimemillis(java.lang.String path, java.lang.String alias)
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

Method Detail


public static long yycurrenttimemillis(java.lang.String path,
                                       java.lang.String alias)
                                throws FeralcoreException,