Search in sources :

Example 31 with DateData

use of net.sourceforge.processdash.data.DateData in project processdash by dtuma.

the class EVReportSettings method isTimestampRecent.

private boolean isTimestampRecent() {
    DateData settingsTimestamp = (DateData) getValue("settings//timestamp");
    if (settingsTimestamp == null)
        return false;
    long when = settingsTimestamp.getValue().getTime();
    long delta = System.currentTimeMillis() - when;
    if (10000 < delta && delta < MAX_SETTINGS_AGE)
        touchSettingsTimestamp();
    return (delta < MAX_SETTINGS_AGE);
}
Also used : DateData(net.sourceforge.processdash.data.DateData)

Aggregations

DateData (net.sourceforge.processdash.data.DateData)31 SimpleData (net.sourceforge.processdash.data.SimpleData)10 Date (java.util.Date)6 Iterator (java.util.Iterator)3 SaveableData (net.sourceforge.processdash.data.SaveableData)3 DataContext (net.sourceforge.processdash.data.DataContext)2 DoubleData (net.sourceforge.processdash.data.DoubleData)2 ListData (net.sourceforge.processdash.data.ListData)2 EscapeString (net.sourceforge.processdash.util.EscapeString)2 FileNotFoundException (java.io.FileNotFoundException)1 IOException (java.io.IOException)1 ParseException (java.text.ParseException)1 ArrayList (java.util.ArrayList)1 ConcurrentModificationException (java.util.ConcurrentModificationException)1 HashMap (java.util.HashMap)1 Map (java.util.Map)1 UUID (java.util.UUID)1 PatternSyntaxException (java.util.regex.PatternSyntaxException)1 MalformedData (net.sourceforge.processdash.data.MalformedData)1 MalformedValueException (net.sourceforge.processdash.data.MalformedValueException)1