sum quantity by symbol, price and timestamps within 1ms

https://learninghub.kx.com/forums/topic/sum-quantity-by-symbol-price-and-timestamps-within-1ms

I have a table t with columns: symbol, side, price, time, and qty.
I want to sum the qty by those columns but also group rows where the time values are ≤1ms apart.
for example

``` symbol side time price qty -------------------------------------------------------- x 1 2019.09.07D00:00:00.127000000 100 15 x 1 2019.09.07D00:00:00.128000000 100 10 ```

becomes

``` symbol side time price qty -------------------------------------------------------- x 1 2019.09.07D00:00:00.128000000 100 25 ```

How can I achieve this? Thanks.