| 71 | } |
| 72 | |
| 73 | void TimestampType::getTimeUnit(libmexclass::proxy::method::Context& context) { |
| 74 | namespace mda = ::matlab::data; |
| 75 | mda::ArrayFactory factory; |
| 76 | |
| 77 | auto timestamp_type = std::static_pointer_cast<arrow::TimestampType>(data_type); |
| 78 | const auto timeunit = timestamp_type->unit(); |
| 79 | auto timeunit_mda = factory.createScalar(static_cast<int16_t>(timeunit)); |
| 80 | context.outputs[0] = timeunit_mda; |
| 81 | } |
| 82 | } // namespace arrow::matlab::type::proxy |