Variable name seems to indicate the value should be in ticks but it will be in ms.  Please double check this code.