I am trying to make a kernel module based on linked list and I want to measure the execution time of insertion of 1000 items into the list.
What header file and what function should I use to measure the starting time and the end time?
// start clock here for(i = 0; i < 1000; i++) { struct my_node* new = kmalloc(sizeof(struct my_node), GFP_KERNEL); new->data = i; list_add(&new->entry, &my_list); } // end clock here // print out the execution time in seconds here