#include <stdio.h>
#include "stopwatch.h"
int main() {
double elapsed_seconds;
stopwatch_t stopwatch;
stopwatch = start_timer();
do_something();
elapsed_seconds = end_timer(stopwatch);
printf("Elapsed time: %f seconds\n", elapsed_seconds);
return 0;
}
public class MyApp
{
public static void Main(string[] args)
{
TimedAction.Run(() => {
doSomething();
});
}
}
TimedAction.run {
doSomething()
}
public class MyApp {
public static void main(String[] args) {
TimedAction.run(new Runnable() {
@Override
public void run() {
doSomething();
}
});
}
}
public class MyApp {
public static void main(String[] args) {
TimedAction.run(() -> doSomething());
}
}
runWithTimer(doSomething)