aboutsummaryrefslogtreecommitdiff
path: root/src/org/gnunet/util/AbsoluteTimeMessage.java
blob: 7e8e13aef027a45011a8b3e661dbeae5a2c3990a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
package org.gnunet.util;

import org.gnunet.construct.Message;
import org.gnunet.construct.UInt64;



/**
 * Representation of an AbsoluteTime object, to be sent over the network.
 */
public class AbsoluteTimeMessage implements Message {
    @UInt64
    public long value__;

    public AbsoluteTimeMessage() {

    }


    public AbsoluteTimeMessage(final AbsoluteTime t) {
        if (t.equals(RelativeTime.FOREVER)) {
            this.value__ = -1;
        } else {
            this.value__ = t.getMilliseconds();
        }
    }
}