This tool uses the method GetLiveWaitProfiler from KMO.
Every each X seconds (you can configure this value), Kankuru executes a query and gets statistics from sys.dm_os_wait_stats.
Kankuru keeps in memory the result of the first execution and is able to calculate a diff between the 2 datasets.
KMO knows the definition of some waits. You can add new wait definition in this class.