I'd set up a periodic timer to check for the condition and cancel the timer when the condition becomes true. Since it requires a little bit of higher-order programming, it's somewhat easier with lexical binding (no need for backquote surgery).
;;-*- lexical-binding: t -*-
(defvar piziak-timer nil
"The currently active Piziak-style timer")
(defvar piziak-interval 0.1
"Interval in seconds for Piziak-style timers")
(defun piziak-cancel ()
"Cancel the current Piziak-style timer"
(cancel-timer piziak-timer)
(setq piziak-timer nil))
(defun piziak-do-when (predicate action)
"Execute action when predicate becomes true.
This sets up a Piziak-style timer."
(when (not (null piziak-timer))
(error "I am a Bear of Very Little Brain"))
(let ((timer (timer-create)))
(timer-set-time timer (current-time) piziak-interval)
(timer-set-function
timer
;; This depends on lexical binding
#'(lambda () (when (funcall predicate)
(piziak-cancel)
(funcall action))))
(timer-activate timer)
(setq piziak-timer timer)))