Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Correction of some bugs and performance enhancement.
[jaceP2P.git] / src / jaceP2P / MsgChrono.java
1 package jaceP2P;
2
3 public class MsgChrono implements java.io.Serializable {
4
5         private static final long serialVersionUID = 1L;
6
7         // attributes
8         long ms = 0;
9
10         // constructors
11         public MsgChrono() {
12         }
13
14         // methods
15         public void start() {
16                 ms = System.currentTimeMillis();
17         }
18
19         public long getValue() {
20                 long result = System.currentTimeMillis();
21                 return result - ms;
22         }
23 }