MCPcopy Create free account
hub / github.com/apache/arrow / get_TimeUnit_multiplier

Function get_TimeUnit_multiplier

r/src/r_to_arrow.cpp:620–633  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

618};
619
620int64_t get_TimeUnit_multiplier(TimeUnit::type unit) {
621 switch (unit) {
622 case TimeUnit::SECOND:
623 return 1;
624 case TimeUnit::MILLI:
625 return 1000;
626 case TimeUnit::MICRO:
627 return 1000000;
628 case TimeUnit::NANO:
629 return 1000000000;
630 default:
631 return 0;
632 }
633}
634
635Result<int> get_difftime_unit_multiplier(SEXP x) {
636 std::string unit(CHAR(STRING_ELT(Rf_getAttrib(x, symbols::units), 0)));

Callers 3

ExtendMethod · 0.85
ExtendMethod · 0.85
ExtendMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected