Skip to content
Browse files

Fixed default timestamps from miliseconds to microseconds. Fixed defa…

…ult timestamps for removals
  • Loading branch information...
1 parent 5d39b53 commit 3e512ffc25fb15fc233f04640f123dcf27277161 Filipe Gonçalves committed Feb 2, 2012
Showing with 4 additions and 4 deletions.
  1. +4 −4 lib/Cassandra/Simple.pm
View
8 lib/Cassandra/Simple.pm
@@ -646,7 +646,7 @@ sub insert {
{
name => $_,
value => $columns->{$_},
- timestamp => $opt->{timestamp} // int (gettimeofday * 1000),
+ timestamp => $opt->{timestamp} // int (gettimeofday * 1000000),
ttl => $opt->{ttl} // undef,
}
)
@@ -710,7 +710,7 @@ sub insert_super {
name => $_,
value => $columns->{$arg}->{$_},
timestamp => $opt->{timestamp}
- // int (gettimeofday * 1000),
+ // int (gettimeofday * 1000000),
ttl => $opt->{ttl} // undef,
}
)
@@ -777,7 +777,7 @@ sub batch_insert {
{
name => $_,
value => $columns->{$_},
- timestamp => $opt->{timestamp} // int (gettimeofday * 1000),
+ timestamp => $opt->{timestamp} // int (gettimeofday * 1000000),
ttl => $opt->{ttl} // undef,
}
)
@@ -908,7 +908,7 @@ sub remove {
my $keys = shift;
my $opt = shift // {};
- my $timestamp = time;
+ my $timestamp = int (gettimeofday * 1000000);
my $level = $self->_consistency_level_write($opt);
if ($keys) {

0 comments on commit 3e512ff

Please sign in to comment.
Something went wrong with that request. Please try again.