Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Object[] params1 = new Object[]{API_KEY, playerName};
- String result = (String) client.execute("player.seen", params1);
- int timeStamp = Integer.parseInt(result);
- Date curDate = new Date();
- int TimeStamp_now = (int) curDate.getTime();
- float diff = TimeStamp_now - timeStamp;
- int seconds = (int) (diff / (1000) % 60);
- int minutes = (int) (diff / (60 * 1000) % 60);
- int hours = (int) (diff / (60 * 60 * 1000) % 24);
- int days = (int) (diff / (24 * 60 * 60 * 1000));
- System.out.println(days + " days, " + hours + " hours, " + minutes + " minutes, " + seconds + " seconds.");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement