java get current time in seconds

103

java get current time in seconds -

LocalDateTime date = LocalDateTime.now();
int seconds = date.toLocalTime().toSecondOfDay();

Comments

Submit
0 Comments