<p>If you change the inner text layer's source text to this it will work:</p>

<pre><code>thisCompLayer = comp("outer").layer(thisComp.name);    
thisCompLayer.time + thisCompLayer.startTime
</code></pre>

<p>You just offset the time to cope with the later start time. </p>

<p>Looks like when AE calculates values from another composition it just calculates them for the current comp's time. It makes sense, because there could be multiple copies, or no copies at all of the inner comp in the outer comp.</p>

CC BY-SA 3.0
2016-02-04T07:48:07.897Z
It works! Thank you so much, it will make my day so much easier.
Martin Winged
CC BY-SA 3.0
2016-02-04T07:14:22.297Z
2016-02-04T07:14:22.297Z
stib
<p>Suppose I've got 2 sequences, one named OUTER and one named INNER. Composition INNER is inside composition OUTER. INNER is shorter than OUTER and is placed in the middle of it's timeline. Inside INNER there is a text object which I want to display OUTER's current time - but I found out this is not so straightforward as I thought. My first idea was to create a solid namer TIMER inside OUTER and link the INNER's text object 'Source Text' to <code>comp("OUTER").layer("TIMER").time</code> and despite that this layer lasts from the beginning to the end of OUTER, the text shown from OUTER's perspective is always starting with 0.0 when INNER starts.</p>

<p>For the sake of clarity, here is the pic:<a href="https://i.sstatic.net/Hz5Yv.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Hz5Yv.png" alt="illustration"></a></p>

<p>Is there a proper way to get linked composition's current time?</p>

CC BY-SA 3.0
2016-02-04T05:40:57.320Z
What happens if you change the expression on the Inner text layer to `comp("outer").time`?
stib
CC BY-SA 3.0
2016-02-04T07:08:41.587Z
nah, that doesn't work. The time property seems to belon to layers, not to comps. Weird.
stib
<after-effects><after-effects-expressions>
How to get 'outer' composition's current time?
Martin Winged
# How to get 'outer' composition's current time?

(Asked by: username_0 on 2016-01-31)

Suppose I've got 2 sequences, one named OUTER and one named INNER. Composition INNER is inside composition OUTER. INNER is shorter than OUTER and is placed in the middle of it's timeline. Inside INNER there is a text object which I want to display OUTER's current time - but I found out this is not so straightforward as I thought. My first idea was to create a solid namer TIMER inside OUTER and link the INNER's text object 'Source Text' to `comp("OUTER").layer("TIMER").time` and despite that this layer lasts from the beginning to the end of OUTER, the text shown from OUTER's perspective is always starting with 0.0 when INNER starts.

For the sake of clarity, here is the pic:[![illustration](https://i.sstatic.net/Hz5Yv.png)](https://i.sstatic.net/Hz5Yv.png)

Is there a proper way to get linked composition's current time?

**Tags:** after-effects, after-effects-expressions

> **Comments:**
> **username_1**: What happens if you change the expression on the Inner text layer to `comp("outer").time`?  
> **username_1**: nah, that doesn't work. The time property seems to belon to layers, not to comps. Weird.  

---

## 1 answers

### Answer by username_1 on 2016-02-04. Score: 1 | Accepted answer

If you change the inner text layer's source text to this it will work:
thisCompLayer = comp("outer").layer(thisComp.name);    
thisCompLayer.time + thisCompLayer.startTime

You just offset the time to cope with the later start time. 
Looks like when AE calculates values from another composition it just calculates them for the current comp's time. It makes sense, because there could be multiple copies, or no copies at all of the inner comp in the outer comp.

> **Comments:**
> **username_0**: It works! Thank you so much, it will make my day so much easier.  

---

