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