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

22
LINES

< > BotCompany Repo | #1036584 // test_MultiSleeper

JavaX fragment (include) [tags: use-pretranspiled]

Libraryless. Click here for Pure Java version (10863L/59K).

1  
sclass Test_MultiSleeper {
2  
  new MultiSleeper ms;
3  
  
4  
  void allTests {
5  
    assertNull(ms.nextWakeUpTime());
6  
    singleTask();
7  
    singleTask();
8  
  }
9  
  
10  
  void singleTask {
11  
    new Flag flag;
12  
    ms.doLater(new Timestamp().plusSeconds(0.5), flag);
13  
    assertFalseVerbose("Not yet", flag.isUp());
14  
    sleepSeconds(1);
15  
    assertTrueVerbose(flag.isUp());
16  
  }
17  
}
18  
19  
svoid test_MultiSleeper() {
20  
  new Test_MultiSleeper().allTests();
21  
22  
}

download  show line numbers  debug dex  old transpilations   

Travelled to 2 computer(s): mqqgnosmbjvj, wnsclhtenguj

No comments. add comment

Snippet ID: #1036584
Snippet name: test_MultiSleeper
Eternal ID of this version: #1036584/2
Text MD5: 55e75d5568bce2ee00ec49d04de34c3b
Transpilation MD5: 1374737fa25827476e42336eb0815b72
Author: stefan
Category: javax
Type: JavaX fragment (include)
Public (visible to everyone): Yes
Archived (hidden from active list): No
Created/modified: 2023-03-22 14:59:28
Source code size: 447 bytes / 22 lines
Pitched / IR pitched: No / No
Views / Downloads: 128 / 195
Version history: 1 change(s)
Referenced in: [show references]