add system independent time function