add ScopedTime to check time a function takes and print warning if >10ms

enabled on linux only in debug builds