# format_add_tv

- **Language:** C
- **Kind:** function
- **Source:** https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L3946
- **Page:** https://libtmux.org/en/tmux/latest/reference/c-function-format_add_tv/

```c
void format_add_tv(struct format_tree *ft, const char *key, struct timeval *tv)
```

## Parameters

- `ft` (`struct format_tree *`)
- `key` (`const char *`)
- `tv` (`struct timeval *`)

## Called by

- [`cmd_show_messages_exec`](/en/tmux/latest/reference/c-function-cmd-show-messages-c-cmd_show_messages_exec/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/cmd-show-messages.c#L98)

## Calls

- [`xmalloc`](/en/tmux/latest/reference/c-function-xmalloc/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L3950)
- [`xstrdup`](/en/tmux/latest/reference/c-function-xstrdup/) (function) [Call site](https://github.com/tmux/tmux/blob/e476c1230b958df0cb12977517d24b3dc931375b/format.c#L3951)

## Referenced declarations

- [`format_entry.cb`](/en/tmux/latest/reference/c-struct-format_entry-cb/) (attribute)
- [`format_tree`](/en/tmux/latest/reference/c-struct-format_tree/) (struct)
- [`format_entry.key`](/en/tmux/latest/reference/c-struct-format_entry-key/) (attribute)
- [`format_entry.time`](/en/tmux/latest/reference/c-struct-format_entry-time/) (attribute)
- [`format_tree.tree`](/en/tmux/latest/reference/c-struct-format_tree-tree/) (attribute)
- [`format_entry.value`](/en/tmux/latest/reference/c-struct-format_entry-value/) (attribute)
