timer = Time(0);....do smth here...timer = Time(0)-timer;
Now timer contains the number of seconds that the operation took.