static long toMS(double seconds) { ret (long) (seconds*1000); } static long toMS(Duration d) { ret d == null ? 0 : d.toMillis(); }