# L-29 MCS 260 Fri 18 Mar 2016 : timetosort
"""
This program illustrates how to time the
sort of lists.  The optional command line
argument is the length of the list to sort.
"""
import time
import sys
from random import gauss

if len(sys.argv) < 2:
    N = int(input('Give #elements : '))
else:
    N = int(sys.argv[1])
NUM = [gauss(0, 1) for i in range(N)]
START_TIME = time.clock()
NUM.sort()
STOP_TIME = time.clock()
ELAPSED = STOP_TIME - START_TIME
print('sorting %d floats' % N \
    + ' took %.3f seconds ' % ELAPSED)

