Added asElapsedTime function to Formatter

See issue #2561