Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(288)

Issue 10443008: Implement File.lastModified. (Closed)

Created:
8 years, 7 months ago by Mads Ager (google)
Modified:
8 years, 7 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Implement File.lastModified. R=sgjesse@google.com,ajohnsen@google.com BUG=dartbug/2988 TEST=standalone/io/file* Committed: https://code.google.com/p/dart/source/detail?r=7945

Patch Set 1 #

Total comments: 14

Patch Set 2 : Code style update #

Patch Set 3 : Return ms from C #

Unified diffs Side-by-side diffs Delta from patch set Stats (+255 lines, -165 lines) Patch
M runtime/bin/builtin_natives.cc View 1 chunk +1 line, -0 lines 0 comments Download
M runtime/bin/directory_impl.dart View 1 10 chunks +45 lines, -44 lines 0 comments Download
M runtime/bin/file.h View 2 chunks +8 lines, -6 lines 0 comments Download
M runtime/bin/file.cc View 1 2 4 chunks +35 lines, -0 lines 0 comments Download
M runtime/bin/file.dart View 1 chunk +13 lines, -0 lines 0 comments Download
M runtime/bin/file_impl.dart View 1 2 24 chunks +102 lines, -106 lines 0 comments Download
M runtime/bin/file_linux.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M runtime/bin/file_macos.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M runtime/bin/file_win.cc View 1 chunk +9 lines, -0 lines 0 comments Download
M runtime/bin/socket_impl.dart View 1 4 chunks +5 lines, -9 lines 0 comments Download
M tests/standalone/io/file_fuzz_test.dart View 2 chunks +2 lines, -0 lines 0 comments Download
M tests/standalone/io/file_test.dart View 2 chunks +17 lines, -0 lines 0 comments Download

Messages

Total messages: 7 (0 generated)
Mads Ager (google)
8 years, 7 months ago (2012-05-24 11:55:04 UTC) #1
Anders Johnsen
LGTM, thank you! :) https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file.h File runtime/bin/file.h (right): https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file.h#newcode129 runtime/bin/file.h:129: static time_t LastModified(const char* name); ...
8 years, 7 months ago (2012-05-24 12:05:42 UTC) #2
Mads Ager (google)
https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file.h File runtime/bin/file.h (right): https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file.h#newcode129 runtime/bin/file.h:129: static time_t LastModified(const char* name); On 2012/05/24 12:05:42, ajohnsen ...
8 years, 7 months ago (2012-05-24 12:09:21 UTC) #3
Anders Johnsen
https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file.h File runtime/bin/file.h (right): https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file.h#newcode129 runtime/bin/file.h:129: static time_t LastModified(const char* name); On 2012/05/24 12:09:21, Mads ...
8 years, 7 months ago (2012-05-24 12:12:59 UTC) #4
Mads Ager (google)
https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file_impl.dart File runtime/bin/file_impl.dart (right): https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file_impl.dart#newcode5 runtime/bin/file_impl.dart:5: final int _MS_PER_SECOND = 1000; On 2012/05/24 12:12:59, ajohnsen ...
8 years, 7 months ago (2012-05-24 12:18:43 UTC) #5
Søren Gjesse
lgtm https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file_impl.dart File runtime/bin/file_impl.dart (right): https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file_impl.dart#newcode534 runtime/bin/file_impl.dart:534: return new Date.fromEpoch(response * _MS_PER_SECOND); How about having ...
8 years, 7 months ago (2012-05-24 12:43:45 UTC) #6
Mads Ager (google)
8 years, 7 months ago (2012-05-24 13:09:40 UTC) #7
Updated lots of constants to the Dart code style. Returning ms from C.

https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file_impl....
File runtime/bin/file_impl.dart (right):

https://chromiumcodereview.appspot.com/10443008/diff/1/runtime/bin/file_impl....
runtime/bin/file_impl.dart:534: return new Date.fromEpoch(response *
_MS_PER_SECOND);
On 2012/05/24 12:43:45, Søren Gjesse wrote:
> How about having the result be in ms so we don't have the * _MS_PER_SECOND
here
> but in the OS files instead. Then we could change to use a more precise system
> call (if it exists) with less changes to the code.

Good call. That makes sense. Will do.

Powered by Google App Engine
This is Rietveld 408576698