`getDuration` is synchronous, inside the example it was used with a promise, which is quite missleading...