Added timing to kmeans and gmeans