mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-09 22:49:57 +09:00
Merge pull request #2885 from Snowapril/rename-time-module
Rename time_module.rs to time.rs
This commit is contained in:
@@ -40,7 +40,7 @@ mod symtable;
|
||||
mod sysconfigdata;
|
||||
#[cfg(feature = "threading")]
|
||||
mod thread;
|
||||
mod time_module;
|
||||
mod time;
|
||||
mod unicodedata;
|
||||
mod warnings;
|
||||
mod weakref;
|
||||
@@ -126,7 +126,7 @@ pub fn get_module_inits() -> StdlibMap {
|
||||
"_sre" => sre::make_module,
|
||||
"_string" => string::make_module,
|
||||
"_struct" => pystruct::make_module,
|
||||
"time" => time_module::make_module,
|
||||
"time" => time::make_module,
|
||||
"_weakref" => weakref::make_module,
|
||||
"_imp" => imp::make_module,
|
||||
"unicodedata" => unicodedata::make_module,
|
||||
|
||||
@@ -150,7 +150,7 @@ fn sec_to_timeval(sec: f64) -> timeval {
|
||||
|
||||
#[pymodule(name = "select")]
|
||||
mod decl {
|
||||
use super::super::time_module;
|
||||
use super::super::time;
|
||||
use super::*;
|
||||
use crate::exceptions::IntoPyException;
|
||||
use crate::function::OptionalOption;
|
||||
@@ -175,7 +175,7 @@ mod decl {
|
||||
return Err(vm.new_value_error("timeout must be positive".to_owned()));
|
||||
}
|
||||
}
|
||||
let deadline = timeout.map(|s| time_module::get_time() + s);
|
||||
let deadline = timeout.map(|s| time::get_time() + s);
|
||||
|
||||
let seq2set = |list| -> PyResult<(Vec<Selectable>, FdSet)> {
|
||||
let v = vm.extract_elements::<Selectable>(list)?;
|
||||
@@ -214,7 +214,7 @@ mod decl {
|
||||
vm.check_signals()?;
|
||||
|
||||
if let Some(ref mut timeout) = timeout {
|
||||
*timeout = deadline.unwrap() - time_module::get_time();
|
||||
*timeout = deadline.unwrap() - time::get_time();
|
||||
if *timeout < 0.0 {
|
||||
r.clear();
|
||||
w.clear();
|
||||
|
||||
Reference in New Issue
Block a user