I understand that the code is convert miliseconds to seconds, mins and hours, but I dont understand what the " % " does ... int seconds = (int) (milliseconds / 1000) % 60 ;
can someone explain please?
can I do the same action in C++ ? thanks !!
milliseconds = ((System.currentTimeMillis()) - (startTime));
int seconds = (int) (milliseconds / 1000) % 60 ;
int minutes = (int) ((milliseconds / (1000*60)) % 60);
int hours = (int) ((milliseconds / (1000*60*60)) % 24);