There is a question which was recently asked to me in an interview.
Problem: There is a class meant to profile the execution time of the code. The class
Maybe he expected this 'reconfiguration' and question was not about method sequence at all:
class StopWatch { public static long runWithProfiling(Runnable action) { startTime = now; action.run(); return now - startTime; } }