To reproduce the issue: $ slstatus -s | tee then it would print only when the stdout buffer is full, by block of multiple lines. fflush() makes sure the line is printed at every loop iteration
sys/sensors.h has two structs struct timeval: sensor and ksensor: struct sensor { ... struct timeval tv; /* sensor value last change time */ ... };