Update latency.js

Modify the missing else statement