tighten up time conversions.
filter events earlier
minor
check the sample difference between events
Merge branch 'trialfun_fix'