I have to find the time that my program does to create a BST from a file given.First i tried to have a counter,but then i realised that this counter counts how many lines of the file i read.Is there anything-some functions maybe-which can do the job?
Code:while ( fgets(line, LINE_LENGTH, fp) != NULL) { count_lines++; Tree_insert(BulkTree , line , &error); if(error) { printf("Sorry,can not allocate memory . Read %u lines",count_lines); return -1; } } }