If what you really want is just the content of the latest row, then
SELECT
MAX(timeoflogout) as timeoflogout
, SUM(absents)) as tot
FROM (
SELECT recno
, DATEDIFF(timeoflogout, @prevlog) - 1 as absents
, @prevlog := timeoflogout as timeoflogout
FROM (
SELECT recno
, timeoflogout
FROM ajoo
ORDER BY timeoflogout ASC
) as sorted
JOIN (SELECT @prevlog := NULL) as initialise
) recs;
+---------------------+------+
| timeoflogout | tot |
+---------------------+------+
| 2019-10-24 17:37:35 | 15 |
+---------------------+------+
EDIT: P.S. Just curious - what is your next query that requires this data?