get millisecond to display in android decive
问题 Here is my code. int hours = (int) (timeElapsed / 3600000); int minutes = (int) (timeElapsed - hours * 3600000) / 60000; int seconds = (int) (timeElapsed - hours * 3600000 - minutes * 60000) / 1000; I need to now calculate MilliSeconds that runs really fast. Please help me how? 回答1: One way to speed up things is to minimize the run-time mathematical operations by reusing some of the intermediate calculations. Adding some constants, whose calculation is done at compile-time, will increase