Hi every one. I want to ask a question.

Whenever i plugged a usb in my computer i want to save that time when this happen. Means that i want to save when when a usb is plugged in my pc in a particular day. I want to do it in C. Please help me

Thank you

Hi every one. I want to ask a question.

Whenever i plugged a usb in my computer i want to save that time when this happen. Means that i want to save when when a usb is plugged in my pc in a particular day. I want to do it in C. Please help me

Thank you

What OS are you using? I know in Linux, the kernel ring buffer is available as /proc/kmsg - and it gives a CPU timestamp when events happen.

If you get a thread which loops through a blocking read, and checks for a USB event on every read, it should give you what you're looking for.

Good luck.

This question has already been answered. Start a new discussion instead.