Sorry, I made a mistake, it should be if($mytime < 6){, as shown below:
add_filter('the_time', 'dynamictime');
function dynamictime() {
global $post;
$date = $post->post_date;
$time = get_post_time('G', true, $post);
$mytime = time() - $time;
if($mytime < 60){
$mytimestamp = __('Just now');
}else{
$mytimestamp = sprintf(__('%s ago'), human_time_diff($time));
}
return $mytimestamp;
}