hwtimer in scala