conversion from time into sample is more robust now and more informative error