A useful function that was ported from kbn.ts and can be used to convert milliseconds into a kbn unit