Shouldn't that be
```
if (timex_cmp(timespan, fivesec) > 0) {
```
?