aboutsummaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2024-11-30 17:25:36 -0500
committerBruce Hill <bruce@bruce-hill.com>2024-11-30 17:25:36 -0500
commit07dd1894b70f537bff13e8f9cb2613e62947c006 (patch)
tree7ab832a167e1cc7fdedf2e5a45715f87c6d2f161 /types.c
parent919e47a4188acc1da711ac05e5aa097a3b1349f7 (diff)
Bugfixes for moments mixing up microseconds/nanoseconds, plus adding
accessor fields for them
Diffstat (limited to 'types.c')
-rw-r--r--types.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/types.c b/types.c
index 83effd0d..78d52f51 100644
--- a/types.c
+++ b/types.c
@@ -638,6 +638,11 @@ type_t *get_field_type(type_t *t, const char *field_name)
if (streq(field_name, "length")) return INT_TYPE;
return NULL;
}
+ case MomentType: {
+ if (streq(field_name, "seconds")) return Type(IntType, .bits=TYPE_IBITS64);
+ else if (streq(field_name, "microseconds")) return Type(IntType, .bits=TYPE_IBITS64);
+ return NULL;
+ }
case ChannelType: {
if (streq(field_name, "max_size")) return INT_TYPE;
return NULL;