Changeset 4123
- Timestamp:
- Feb 4, 2008, 1:32:08 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/core/net/sf/basedb/core/Job.java
r4095 r4123 1271 1271 */ 1272 1272 private static final long UPDATE_INTERVAL = 5 * 1000; 1273 1274 /** 1275 Min percentage difference between updates to the database. 1276 */ 1277 private static final int UPDATE_PERCENT = 5; 1273 1278 1274 1279 private final SessionControl sc; … … 1301 1306 public void display(int percent, String message) 1302 1307 { 1303 // Do not update unless at least some time has passed, or the plug-in has finished 1304 if (System.currentTimeMillis() - lastUpdate > UPDATE_INTERVAL || percent == 100) 1308 // Do not update unless at least : 1309 // * some time has passed 1310 // * the plug-in has finished (percent == 100) 1311 // * progress has increased by at least 5% 1312 if (System.currentTimeMillis() - lastUpdate >= UPDATE_INTERVAL || 1313 percent == 100 || percent - lastValue >= UPDATE_PERCENT) 1305 1314 { 1306 1315 // If the percent is negative and less then the last value, an offset will be calculated.
Note: See TracChangeset
for help on using the changeset viewer.