A tock() function makes probably not much sense in backtesting, since it is time triggered. But it works in test mode, so I can't tell how and why it does not work for you. Maybe you looked in the wrong file or something like that.