http://steamcommunity.com/app/351970/discussions/0/490123727975443236/#c490123938434479631
This seems even more inclusive for any kind of interfering factor than frame times.
EDIT: actual "almost generic" library is here
EDIT2: also this can't hurt [tutorials][[1]]