Advertisement
Guest User

Non deterministic algorithm

a guest
Dec 8th, 2018
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.50 KB | None | 0 0
  1. package se.clock;
  2.  
  3. import java.io.DataOutputStream;
  4. import java.io.File;
  5. import java.io.FileOutputStream;
  6.  
  7. public class clock {
  8.  
  9.     public static void main(String[] args) throws Exception {
  10.  
  11.         try (DataOutputStream dos = new DataOutputStream(
  12.                 new FileOutputStream(
  13.                         new File("/tmp/nanoimage.data")))) {
  14.             for (int i = 0; i < 250_000; i++) {
  15.                 dos.writeByte((byte) (System.nanoTime() & 0xff));
  16.             }
  17.         }
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement