KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > terracotta > session > util > Timestamp


1 /*
2  * All content copyright (c) 2003-2006 Terracotta, Inc., except as may otherwise be noted in a separate copyright notice. All rights reserved.
3  */

4 package com.terracotta.session.util;
5
6 import java.util.Date JavaDoc;
7
8 public class Timestamp {
9
10   private long millis = 0;
11
12   public Timestamp(long millis) {
13     this.millis = millis;
14   }
15
16   public synchronized long getMillis() {
17     return millis;
18   }
19
20   public synchronized void setMillis(long millis) {
21     this.millis = millis;
22   }
23
24   public String JavaDoc toString() {
25     return new Date JavaDoc(getMillis()).toString();
26   }
27 }
28
Popular Tags