Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (in-package :cl-user)
- #|
- (ql:quickload :chirp)
- (setf chirp:*oauth-api-key* "**************************"
- chirp:*oauth-api-secret* "***************************"
- chirp:*oauth-access-token* "*******************************"
- chirp:*oauth-access-secret* "***************************")
- |#
- (defvar *tw-threads*
- ())
- (defun update-at-time (target-time status)
- (flet ((worker ()
- (loop for now = (get-universal-time)
- if (>= now target-time)
- do (chirp:statuses/update status)
- (loop-finish)
- else
- do (sleep 1/8))))
- (push (sb-thread:make-thread #'worker :name "tw-thread")
- *tw-threads*)))
- (defun reap-tw-threads ()
- (setf *tw-threads*
- (delete-if-not #'sb-thread:thread-alive-p *tw-threads*)))
- #|
- (update-at-time (encode-universal-time 0 41 22 3 1 2018)
- "hoge fuga piyo")
- |#
Add Comment
Please, Sign In to add comment