Use clock() to measure time