added sample accurate duration timing