You shouldn't change duration this way, you should make a "factor" cvar, then increase or decrease original duration.
Also, your duration conversion should be :
PHP Code:
// convert seconds to units
convert(num) return clamp((num * (1<<12)), 0, 0xFFFF)
__________________