Copy BSD fix to refresh() and inline time_diff
Copy BSD fix to refresh() and inline time_diff

dotsplat/dotsplat,xtech9/homeshick,nngo/homeshick,languitar/homeshick,andsens/homeshick,agvim/homeshick,danieldc/homeshick