time calculation for JRuby threading