43 lines
1.1 KiB
Java
43 lines
1.1 KiB
Java
/*
|
|
* Decompiled with CFR 0.152.
|
|
*/
|
|
package com.tridium.fox.message;
|
|
|
|
import com.tridium.fox.message.FoxTuple;
|
|
import com.tridium.fox.message.MessageReader;
|
|
import com.tridium.fox.message.MessageWriter;
|
|
import java.io.IOException;
|
|
import java.text.DateFormat;
|
|
import java.text.SimpleDateFormat;
|
|
import java.util.Date;
|
|
|
|
public final class FoxTime
|
|
extends FoxTuple {
|
|
private DateFormat format = new SimpleDateFormat("HH:mm:ss dd-MMM-yy");
|
|
public long millis;
|
|
|
|
public FoxTime(String string, long l) {
|
|
this.name = string;
|
|
this.millis = l;
|
|
}
|
|
|
|
public FoxTime() {
|
|
}
|
|
|
|
public final int getType() {
|
|
return 116;
|
|
}
|
|
|
|
protected final void writeValue(MessageWriter messageWriter) throws IOException {
|
|
messageWriter.writeHexLong(this.millis);
|
|
if (messageWriter.isDebug) {
|
|
messageWriter.writeSafe(" // ").writeSafe(this.format.format(new Date(this.millis)));
|
|
}
|
|
}
|
|
|
|
protected void readValue(MessageReader messageReader) throws IOException {
|
|
this.millis = messageReader.readHexLong();
|
|
}
|
|
}
|
|
|