change timing functions to match material spec - fixes #41