Code example for Stopwatch

0
    return result;
  } 
 
  private <T> T measureExecution(DatabaseTask<T> task, SQLiteDatabase database)
  { 
    Stopwatch stopwatch = new Stopwatch().start();
    T result = task.execute(database);
 
    Logger.logDbPerformance("Database task took: " + stopwatch.elapsedMillis());
    return result;
  } 
} 
 
Contextual code suggestions in your IDE  Get Codota for Java