Hi Aniroop, On Sat, Aug 01, 2015 at 03:58:52AM +0530, Aniroop Mathur wrote: > When clock type is changed, previously stored data is flushed > and therfore does not reach to upper layer or application. > Data is critically important along with the timestamp. > So to avoid data loss and send correct timestamp as well, > lets not flush data upon clock type change and > to send correct timestamp, store only monotonic timestamp during write > and change monotonic clock time to desired clock time during read. I wonder if this matters that much. The only time where this change would make difference is when you have a reader thread and then a controlling thread changing clocks. Then you probably do not want to lose events, but you also would not know for given event what kind of timestamp it uses. On the other hand I expect that your application changes clock type the very first thing after opening the event device. In this case the flushing queue does not matter: you are losing events that happened before you opened the device, so it does not really matter if you lose a few more in the beginning. I guess I need better understanding of your use case. Thanks. -- Dmitry -- To unsubscribe from this list: send the line "unsubscribe linux-input" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html