Shouldn't it be...

    function offset(ms) {
        offset_time = ms;
    }

...?

`+=` would make the offset increase each time it's used.