add stat time function
it is a ok oversion