Delayed AWT update:
long version;
long lastUpdate; // AWT time
void data_trigger() {
triggerQuickUpdate();
triggerShow(++version, 1000);
}
void awt_quickUpdate() {
if (lastUpdate < now()-1000) {
getAndRenderContent();
lastUpdate = now(); // This can be rough, no problem
}
}
void awt_show(long n) {
if (n == version) {
getAndRenderContent();
lastUpdate = now();
}
}Travelled to 12 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt
No comments. add comment
| Snippet ID: | #1000926 |
| Snippet name: | Delayed AWT update (mid-level implementation description) |
| Eternal ID of this version: | #1000926/1 |
| Text MD5: | 0103fcc42a815b71009a04745f4b294c |
| Author: | stefan |
| Category: | javax |
| Type: | Document |
| Public (visible to everyone): | Yes |
| Archived (hidden from active list): | No |
| Created/modified: | 2015-09-09 17:39:02 |
| Source code size: | 456 bytes / 23 lines |
| Pitched / IR pitched: | No / Yes |
| Views / Downloads: | 759 / 181 |
| Referenced in: | [show references] |