litesoft
Diff Revisions
804
vs
858
for /trunk/Java/GWT/OldServer/src/org/litesoft/GWT/forms/server/support/nonpublic/AbstractFormServicePeer.java
|
@@ -10,6 +10,7 @@ |
10 |
10 |
|
import org.litesoft.changemanagement.*; |
11 |
11 |
|
import org.litesoft.core.delayed.*; |
12 |
12 |
|
import org.litesoft.core.simpletypes.*; |
|
13 |
+ |
import org.litesoft.core.simpletypes.temporal.*; |
13 |
14 |
|
import org.litesoft.core.typeutils.*; |
14 |
15 |
|
import org.litesoft.delayed.*; |
15 |
16 |
|
import org.litesoft.exceptions.*; |
|
@@ -25,6 +26,8 @@ |
25 |
26 |
|
public static final String ERR_COMMIT_FAILED = "CommitFailed"; |
26 |
27 |
|
public static final String ERR_COMMIT_OUT_OF_DATE_DATA = "OutOfDateDataCausedCommitFailure"; |
27 |
28 |
|
|
|
29 |
+ |
private final MillisecTimeSource mMillisecTimeSource = MillisecTimeSource.INSTANCE; |
|
30 |
+ |
|
28 |
31 |
|
protected volatile PushInterface mPushInterface = null; |
29 |
32 |
|
protected ISystemUserResolver mSystemUserResolver = ISystemUserResolver.NULL; |
30 |
33 |
|
protected Serializable mInitializationPayload; |
|
@@ -116,7 +119,7 @@ |
116 |
119 |
|
{ |
117 |
120 |
|
boolean zNotLaunched = (mSendWhen == null); |
118 |
121 |
|
|
119 |
|
- |
long zSendWhen = new Date().getTime() + pSendIn; |
|
122 |
+ |
long zSendWhen = mMillisecTimeSource.now() + pSendIn; |
120 |
123 |
|
|
121 |
124 |
|
mSendWhen = zSendWhen; |
122 |
125 |
|
|
|
@@ -134,7 +137,7 @@ |
134 |
137 |
|
{ |
135 |
138 |
|
return null; |
136 |
139 |
|
} |
137 |
|
- |
if ( new Date().getTime() < mSendWhen ) |
|
140 |
+ |
if ( mMillisecTimeSource.now() < mSendWhen ) |
138 |
141 |
|
{ |
139 |
142 |
|
return new RunAgainOnOrAfter( mSendWhen ); |
140 |
143 |
|
} |