mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-02-26 09:35:46 +00:00
Kernel: Make kgettimeofday use AK::Time
This commit is contained in:
committed by
Andreas Kling
parent
05d5e3fad9
commit
336303bda4
@@ -68,7 +68,7 @@ KResultOr<size_t> InodeFile::write(FileDescription& description, size_t offset,
|
||||
|
||||
ssize_t nwritten = m_inode->write_bytes(offset, count, data, &description);
|
||||
if (nwritten > 0) {
|
||||
m_inode->set_mtime(kgettimeofday().tv_sec);
|
||||
m_inode->set_mtime(kgettimeofday().to_truncated_seconds());
|
||||
Thread::current()->did_file_write(nwritten);
|
||||
evaluate_block_conditions();
|
||||
}
|
||||
@@ -132,7 +132,7 @@ KResult InodeFile::truncate(u64 size)
|
||||
auto truncate_result = m_inode->truncate(size);
|
||||
if (truncate_result.is_error())
|
||||
return truncate_result;
|
||||
int mtime_result = m_inode->set_mtime(kgettimeofday().tv_sec);
|
||||
int mtime_result = m_inode->set_mtime(kgettimeofday().to_truncated_seconds());
|
||||
if (mtime_result < 0)
|
||||
return KResult((ErrnoCode)-mtime_result);
|
||||
return KSuccess;
|
||||
|
||||
Reference in New Issue
Block a user