Not logged in.  Login/Logout/Register | List snippets | | Create snippet | Upload image | Upload data

15
LINES

< > BotCompany Repo | #1010992 // onFileChange

JavaX fragment (include)

static void onFileChange(double seconds, final File file, final long lastModificationSeen, final Runnable r) {
  doEvery_daemon(toMS(seconds), new Runnable {
    long lastMod = lastModificationSeen;
    
    public void run() {
      long mod = file.lastModified();
      if (mod != lastMod) {
        lastMod = mod;
        call(r);
      }
    }
  });
  
  call(r);
}

Author comment

Began life as a copy of #1004395

download  show line numbers  debug dex  old transpilations   

Travelled to 13 computer(s): aoiabmzegqzx, bhatertpkbcr, cbybwowwnfue, cfunsshuasjs, gwrvuhgaqvyk, ishqpsrjomds, lpdgvwnxivlt, mqqgnosmbjvj, pyentgdyhuwx, pzhvpgtvlbxg, tslmcundralx, tvejysmllsmz, vouqrxazstgt

No comments. add comment

Snippet ID: #1010992
Snippet name: onFileChange
Eternal ID of this version: #1010992/1
Text MD5: 6a113a440552b0d35c2bc260e880518f
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2017-10-11 02:49:22
Source code size: 383 bytes / 15 lines
Pitched / IR pitched: No / No
Views / Downloads: 418 / 442
Referenced in: [show references]