Real-time systems must adapt their behaviour when the timing assumptions they are based on change at run time. A viable approach leading to effective adaptations consists of exploiting application-specific knowledge, but limitations of ordinary schedulers constrain its applicability. In this paper this problem is tackled using a reflective scheduler, which enables a computing system to perform temporal reflection, that is to fully observe and control its own temporal behaviour. The scheduler is implemented for the L4 microkernel, and validated by solving a real-time image analysis problem. Compared with other approaches the reflective scheduler is orders of magnitude more precise, achieving microsecond-level accuracy, while its implementation is entirely at user-level, and it does not require any changes to be made to the microkernel itself.