java - System.currentTimeMillis vs System.nanoTime - Stack Overflow:
For example, to measure how long some code takes to execute:
long startTime = System.nanoTime();
// ... the code being measured ...
long estimatedTime = System.nanoTime() - startTime;
Aucun commentaire:
Enregistrer un commentaire