Update for Duration API (yay!)

This commit is contained in:
Steven Fackler 2014-08-14 20:00:13 -07:00
parent e33f2f0fcc
commit 619dd47fca

View File

@ -9,6 +9,7 @@ extern crate openssl;
use openssl::ssl::{SslContext, Sslv3}; use openssl::ssl::{SslContext, Sslv3};
use std::io::timer; use std::io::timer;
use std::time::Duration;
use postgres::{PostgresNoticeHandler, use postgres::{PostgresNoticeHandler,
PostgresNotification, PostgresNotification,
@ -614,7 +615,7 @@ fn test_cancel_query() {
let cancel_data = conn.cancel_data(); let cancel_data = conn.cancel_data();
spawn(proc() { spawn(proc() {
timer::sleep(500); timer::sleep(Duration::milliseconds(500));
assert!(postgres::cancel_query("postgres://postgres@localhost", &NoSsl, assert!(postgres::cancel_query("postgres://postgres@localhost", &NoSsl,
cancel_data).is_ok()); cancel_data).is_ok());
}); });