title: Write a C program to measure time spent in context switch in Linux OS
body: <p>Can we write a c program to find out time spent in context switch in Linux? Could you please share code if you have one? 
  Thanks</p>