The "make it static" suggestion is a mislead. While it's possible to do things that way, it probably isn't the *right* solution for this problem.

You have some fields in your dt class----last_ticks, etc. Where are these variables intended to live? You can either make them global, in which case you probably want dt to be a namespace rather than a class, or you can create a dt object to contain them. The latter is probably a better idea.